﻿
CREATE PROCEDURE [dbo].[proc_Employee_Attendance_GetItem]
	(
		@Id int
	)
AS
	Begin
										
		Select 
			Id,
			UserName,
			EName,
			CompanyId,
			(Select c.CompanyName From Company c Where c.Id=CompanyId) as CompanyName,
			DepartmentId,
			(Select d.DName From Department d Where d.Id=DepartmentId) as DepartmentName,
			TypeId,
			--(Select eat.Title From Employee_Attendance_Type eat Where eat.Id=TypeId) as TypeName,
			KouKuanAmount, 
			KouKuanFromDate,
			KouKuanToDate,
			Description,
			(Select e.EName From Employee e Where e.UserName=CreateName) as CreateName,
			CreateDate,
			isnull(isflag,0) as isflag,
			isnull([Days],0) as [Days],
			t_TypeName
		From
			Employee_Attendance
		Where 
			Id=@Id				    
								    
	End
	RETURN

